package com.song.gateway.factory;

import com.song.gateway.filters.OrderCheckGatewayFilter;
import lombok.Data;
import org.springframework.cloud.gateway.filter.GatewayFilter;
import org.springframework.cloud.gateway.filter.factory.AbstractGatewayFilterFactory;
import org.springframework.stereotype.Component;

@Component
public class OrderCheckGatewayFilterFactory extends AbstractGatewayFilterFactory<OrderCheckGatewayFilterFactory.OrderCheckProperties> {

    public GatewayFilter apply(OrderCheckProperties config) {
        return new OrderCheckGatewayFilter();
    }

    @Data
    class OrderCheckProperties {
        private boolean useful;
    }
}
